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

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

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

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

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

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

l = A("l")
h = B("h")
n = C("n")
a = D("a")
j = E("j")
g = F("g")
m = C("m")
c = D("c")
f = F("f")

l.z = a
l.t = h
l.y = j
l.u = j
l.x = f
h.y = j
n.t = m
n.u = g
n.x = l
n.r = l
n.o = j
a.q = l
a.r = l
a.x = m
a.w = c
a.o = c
a.y = f
j.u = f
j.t = f
g.w = a
m.t = n
m.u = f
m.x = l
m.r = l
m.o = j
c.q = l
c.r = l
c.x = m
c.w = a
c.o = a
c.y = f
f.w = c
assert a.w.q.u.u.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: B = None
        self.y: E = None
        self.u: E = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

l = A("l")
h = B("h")
n = C("n")
a = D("a")
j = E("j")
g = F("g")
m = C("m")
c = D("c")
f = F("f")

l.z = a
l.t = h
l.y = j
l.u = j
l.x = f
h.y = j
n.t = m
n.u = g
n.x = l
n.r = l
n.o = j
a.q = l
a.r = l
a.x = m
a.w = c
a.o = c
a.y = f
j.u = f
j.t = f
g.w = a
m.t = n
m.u = f
m.x = l
m.r = l
m.o = j
c.q = l
c.r = l
c.x = m
c.w = a
c.o = a
c.y = f
f.w = c
assert a.w.q.u.u.w.w.txt == "a"