class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: J = None
        self.t: I = None
        self.w: C = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.s: F = None
        self.p: A = None
        self.u: I = None
        self.y: C = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: G = None
        self.w: G = None
        self.p: C = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.s: C = None
        self.o: G = None
        self.v: B = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: J = None
        self.t: I = None
        self.w: C = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.s: F = None
        self.p: A = None
        self.u: I = None
        self.y: C = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: G = None
        self.w: G = None
        self.p: C = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.s: C = None
        self.o: G = None
        self.v: B = None
        self.t: B = None
        self.txt = txt

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

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