class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.w: F = None
        self.s: E = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: B = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: E = None
        self.y: E = None
        self.w: C = None
        self.o: F = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.u: E = None
        self.txt = txt

g = A("g")
j = B("j")
f = C("f")
l = D("l")
d = E("d")
e = F("e")
n = F("n")
b = E("b")
i = E("i")

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: B = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: E = None
        self.y: E = None
        self.w: C = None
        self.o: F = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.u: E = None
        self.txt = txt

g = A("g")
j = B("j")
f = C("f")
l = D("l")
d = E("d")
e = F("e")
n = F("n")
b = E("b")
i = E("i")

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