class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: I = None
        self.q: J = None
        self.r: J = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: D = None
        self.x: I = None
        self.r: G = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: I = None
        self.v: F = None
        self.u: B = None
        self.z: B = None
        self.r: J = None
        self.s: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.s: G = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: D = None
        self.x: I = None
        self.r: G = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: I = None
        self.v: F = None
        self.u: B = None
        self.z: B = None
        self.r: J = None
        self.s: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.s: G = None
        self.t: G = None
        self.txt = txt

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

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