class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: C = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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