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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: G = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: B = None
        self.w: H = None
        self.q: G = None
        self.u: H = None
        self.s: F = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: F = None
        self.r: G = None
        self.q: B = None
        self.x: F = None
        self.p: F = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: G = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: B = None
        self.w: H = None
        self.q: G = None
        self.u: H = None
        self.s: F = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: F = None
        self.r: G = None
        self.q: B = None
        self.x: F = None
        self.p: F = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

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

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