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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.o: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.o: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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