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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: B = None
        self.v: C = None
        self.o: F = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: C = None
        self.txt = txt

k = A("k")
d = B("d")
i = C("i")
m = D("m")
f = E("f")
b = F("b")
j = C("j")
g = B("g")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: B = None
        self.v: C = None
        self.o: F = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: C = None
        self.txt = txt

k = A("k")
d = B("d")
i = C("i")
m = D("m")
f = E("f")
b = F("b")
j = C("j")
g = B("g")

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