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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: I = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: D = None
        self.o: A = None
        self.u: C = None
        self.y: F = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: I = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: D = None
        self.o: A = None
        self.u: C = None
        self.y: F = None
        self.x: A = None
        self.txt = txt

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

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

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