class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: F = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: I = None
        self.u: D = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: B = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.o: B = None
        self.q: J = None
        self.y: C = None
        self.u: F = None
        self.w: E = None
        self.t: B = None
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: F = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: I = None
        self.u: D = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: B = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.o: B = None
        self.q: J = None
        self.y: C = None
        self.u: F = None
        self.w: E = None
        self.t: B = None
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: B = None
        self.txt = txt

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

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