class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: D = None
        self.x: E = None
        self.z: H = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.t: H = None
        self.x: C = None
        self.u: E = None
        self.z: C = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: F = None
        self.r: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.w: A = None
        self.s: G = None
        self.q: A = None
        self.r: E = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: H = None
        self.u: D = None
        self.o: D = None
        self.v: H = None
        self.y: H = None
        self.q: H = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

k = A("k")
m = B("m")
f = C("f")
g = D("g")
e = E("e")
j = F("j")
c = G("c")
n = H("n")
l = B("l")

k.s = l
m.o = j
m.u = g
m.x = e
m.p = e
m.z = n
f.x = c
g.q = f
g.x = f
g.z = f
g.s = m
g.t = n
g.u = e
g.w = j
e.v = n
e.y = j
e.r = g
e.o = m
j.z = g
j.t = k
j.w = k
j.q = k
j.s = c
j.r = e
j.v = n
c.t = m
c.x = m
c.p = n
c.v = n
c.y = n
c.q = n
c.u = g
c.o = g
n.p = e
l.o = j
l.u = g
l.x = e
l.p = e
l.z = n
assert f.x.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: D = None
        self.x: E = None
        self.z: H = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.t: H = None
        self.x: C = None
        self.u: E = None
        self.z: C = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: F = None
        self.r: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.w: A = None
        self.s: G = None
        self.q: A = None
        self.r: E = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: H = None
        self.u: D = None
        self.o: D = None
        self.v: H = None
        self.y: H = None
        self.q: H = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

k = A("k")
m = B("m")
f = C("f")
g = D("g")
e = E("e")
j = F("j")
c = G("c")
n = H("n")
l = B("l")

k.s = l
m.o = j
m.u = g
m.x = e
m.p = e
m.z = n
f.x = c
g.q = f
g.x = f
g.z = f
g.s = m
g.t = n
g.u = e
g.w = j
e.v = n
e.y = j
e.r = g
e.o = m
j.z = g
j.t = k
j.w = k
j.q = k
j.s = c
j.r = e
j.v = n
c.t = m
c.x = m
c.p = n
c.v = n
c.y = n
c.q = n
c.u = g
c.o = g
n.p = e
l.o = j
l.u = g
l.x = e
l.p = e
l.z = n
assert f.x.t.o.txt == "j"