class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: C = None
        self.o: C = None
        self.s: A = None
        self.t: C = None
        self.z: C = None
        self.x: E = None
        self.v: I = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: I = None
        self.z: B = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: C = None
        self.o: C = None
        self.s: A = None
        self.t: C = None
        self.z: C = None
        self.x: E = None
        self.v: I = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: I = None
        self.z: B = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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