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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: A = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: A = None
        self.w: F = None
        self.txt = txt

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

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

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