class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: C = None
        self.x: C = None
        self.q: F = None
        self.w: E = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: C = None
        self.x: C = None
        self.q: F = None
        self.w: E = None
        self.s: F = None
        self.txt = txt

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

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