class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: B = None
        self.x: B = None
        self.q: H = None
        self.o: D = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: I = None
        self.t: C = None
        self.p: I = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.s: D = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: E = None
        self.q: I = None
        self.z: C = None
        self.t: I = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: I = None
        self.t: C = None
        self.p: I = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.s: D = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: E = None
        self.q: I = None
        self.z: C = None
        self.t: I = None
        self.u: B = None
        self.txt = txt

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

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

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