class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: A = None
        self.q: D = None
        self.p: F = None
        self.x: G = None
        self.z: F = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: A = None
        self.w: E = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.o: G = None
        self.t: A = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: A = None
        self.q: D = None
        self.p: F = None
        self.x: G = None
        self.z: F = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: A = None
        self.w: E = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.o: G = None
        self.t: A = None
        self.r: D = None
        self.txt = txt

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

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