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

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

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

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

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

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

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

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

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

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

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

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

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

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

l.x = b
l.y = j
l.z = j
l.t = a
l.s = f
l.w = c
c.v = b
c.z = m
a.o = l
a.q = b
a.v = b
a.x = n
m.z = a
m.v = a
m.y = b
b.o = l
b.r = l
b.s = m
b.q = n
b.v = a
f.q = l
f.o = j
d.v = b
d.z = j
n.v = b
n.z = j
h.v = b
h.z = m
j.z = a
j.v = a
j.y = b
assert l.w.z.y.q.z.z.o.s.txt == "f"