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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: A = None
        self.s: C = None
        self.y: B = None
        self.o: C = None
        self.u: D = None
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: A = None
        self.v: B = None
        self.t: C = None
        self.r: D = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: C = None
        self.y: D = None
        self.s: E = None
        self.p: E = None
        self.q: B = None
        self.txt = txt

b = A("b")
m = B("m")
e = C("e")
h = D("h")
g = E("g")
j = F("j")
a = G("a")
f = H("f")
l = I("l")

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: A = None
        self.s: C = None
        self.y: B = None
        self.o: C = None
        self.u: D = None
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: A = None
        self.v: B = None
        self.t: C = None
        self.r: D = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: C = None
        self.y: D = None
        self.s: E = None
        self.p: E = None
        self.q: B = None
        self.txt = txt

b = A("b")
m = B("m")
e = C("e")
h = D("h")
g = E("g")
j = F("j")
a = G("a")
f = H("f")
l = I("l")

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