class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: E = None
        self.y: E = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.v: C = None
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: F = None
        self.u: A = None
        self.z: D = None
        self.p: E = None
        self.txt = txt

g = A("g")
d = B("d")
k = C("k")
c = D("c")
f = E("f")
n = F("n")
h = F("h")
i = D("i")
j = C("j")

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.v: C = None
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: F = None
        self.u: A = None
        self.z: D = None
        self.p: E = None
        self.txt = txt

g = A("g")
d = B("d")
k = C("k")
c = D("c")
f = E("f")
n = F("n")
h = F("h")
i = D("i")
j = C("j")

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