class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: D = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: D = None
        self.w: F = None
        self.t: D = None
        self.o: A = None
        self.v: H = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: G = None
        self.r: G = None
        self.y: H = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: C = None
        self.t: A = None
        self.o: D = None
        self.y: H = None
        self.u: B = None
        self.q: E = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: D = None
        self.w: F = None
        self.t: D = None
        self.o: A = None
        self.v: H = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: G = None
        self.r: G = None
        self.y: H = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: C = None
        self.t: A = None
        self.o: D = None
        self.y: H = None
        self.u: B = None
        self.q: E = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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