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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: C = None
        self.r: C = None
        self.t: F = None
        self.u: J = None
        self.w: E = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.u: H = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: I = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: B = None
        self.p: C = None
        self.u: D = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: C = None
        self.r: C = None
        self.t: F = None
        self.u: J = None
        self.w: E = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.u: H = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: I = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: B = None
        self.p: C = None
        self.u: D = None
        self.q: C = None
        self.txt = txt

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

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