class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: C = None
        self.u: A = None
        self.o: F = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.y: F = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.y: F = None
        self.w: F = None
        self.txt = txt

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

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