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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: E = None
        self.w: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.y: C = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: D = None
        self.q: E = None
        self.x: E = None
        self.v: B = None
        self.txt = txt

l = A("l")
j = B("j")
m = C("m")
k = D("k")
f = E("f")
c = F("c")
h = B("h")
e = C("e")
a = A("a")
d = B("d")

l.u = k
l.s = k
l.o = a
l.r = d
j.y = d
m.s = k
m.r = c
m.v = e
k.v = e
k.s = f
k.w = a
k.q = h
f.v = a
f.o = d
f.y = e
f.q = k
c.z = f
c.q = f
c.x = f
c.p = k
c.v = d
h.y = j
e.s = k
e.r = c
e.v = m
a.u = k
a.s = k
a.o = l
a.r = h
d.y = j
assert a.o.r.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: A = None
        self.s: D = None
        self.r: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: E = None
        self.w: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.y: C = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: D = None
        self.q: E = None
        self.x: E = None
        self.v: B = None
        self.txt = txt

l = A("l")
j = B("j")
m = C("m")
k = D("k")
f = E("f")
c = F("c")
h = B("h")
e = C("e")
a = A("a")
d = B("d")

l.u = k
l.s = k
l.o = a
l.r = d
j.y = d
m.s = k
m.r = c
m.v = e
k.v = e
k.s = f
k.w = a
k.q = h
f.v = a
f.o = d
f.y = e
f.q = k
c.z = f
c.q = f
c.x = f
c.p = k
c.v = d
h.y = j
e.s = k
e.r = c
e.v = m
a.u = k
a.s = k
a.o = l
a.r = h
d.y = j
assert a.o.r.y.y.y.txt == "j"