class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: C = None
        self.o: D = None
        self.s: C = None
        self.r: F = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: C = None
        self.y: C = None
        self.r: G = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: A = None
        self.z: E = None
        self.o: F = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: C = None
        self.v: D = None
        self.txt = txt

g = A("g")
c = B("c")
l = C("l")
b = D("b")
a = E("a")
e = F("e")
f = G("f")
i = H("i")

g.q = e
g.r = e
g.u = l
g.s = l
g.o = b
g.p = f
c.w = g
c.r = e
l.y = e
b.x = a
b.s = l
b.y = l
b.r = f
b.z = e
a.z = b
a.q = i
e.p = c
e.o = b
e.s = b
f.x = b
f.u = g
f.t = g
f.z = a
f.o = e
i.o = g
i.w = l
i.v = b
assert a.z.y.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: C = None
        self.o: D = None
        self.s: C = None
        self.r: F = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: C = None
        self.y: C = None
        self.r: G = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: A = None
        self.z: E = None
        self.o: F = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: C = None
        self.v: D = None
        self.txt = txt

g = A("g")
c = B("c")
l = C("l")
b = D("b")
a = E("a")
e = F("e")
f = G("f")
i = H("i")

g.q = e
g.r = e
g.u = l
g.s = l
g.o = b
g.p = f
c.w = g
c.r = e
l.y = e
b.x = a
b.s = l
b.y = l
b.r = f
b.z = e
a.z = b
a.q = i
e.p = c
e.o = b
e.s = b
f.x = b
f.u = g
f.t = g
f.z = a
f.o = e
i.o = g
i.w = l
i.v = b
assert a.z.y.y.o.txt == "b"