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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.r: D = None
        self.p: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: F = None
        self.q: A = None
        self.txt = txt

f = A("f")
c = B("c")
d = C("d")
l = D("l")
h = E("h")
i = F("i")
m = G("m")
j = G("j")
k = F("k")
b = A("b")

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.r: D = None
        self.p: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: F = None
        self.q: A = None
        self.txt = txt

f = A("f")
c = B("c")
d = C("d")
l = D("l")
h = E("h")
i = F("i")
m = G("m")
j = G("j")
k = F("k")
b = A("b")

f.x = d
f.s = h
c.s = l
c.z = l
c.u = h
d.o = c
d.s = j
d.r = l
d.p = l
l.v = i
h.p = i
h.u = i
h.t = d
h.s = k
h.q = k
h.w = f
h.x = l
i.y = k
i.z = k
i.q = l
i.p = b
m.z = d
m.p = i
m.q = f
j.z = d
j.p = i
j.q = f
k.y = i
k.z = i
k.q = l
k.p = b
b.x = d
b.s = h
assert h.w.s.q.y.q.v.p.s.txt == "h"