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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: E = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: E = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

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

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

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