class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: B = None
        self.o: B = None
        self.w: H = None
        self.t: F = None
        self.x: C = None
        self.v: F = None
        self.y: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: A = None
        self.u: B = None
        self.s: A = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: A = None
        self.u: B = None
        self.s: A = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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