class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: H = None
        self.t: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: G = None
        self.r: H = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: C = None
        self.t: C = None
        self.p: G = None
        self.q: D = None
        self.y: B = None
        self.z: C = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: G = None
        self.x: C = None
        self.w: E = None
        self.r: D = None
        self.p: A = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.txt = txt

f = A("f")
k = B("k")
c = C("c")
g = D("g")
h = E("h")
l = F("l")
b = G("b")
a = H("a")
d = B("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: G = None
        self.r: H = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: C = None
        self.t: C = None
        self.p: G = None
        self.q: D = None
        self.y: B = None
        self.z: C = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: G = None
        self.x: C = None
        self.w: E = None
        self.r: D = None
        self.p: A = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.txt = txt

f = A("f")
k = B("k")
c = C("c")
g = D("g")
h = E("h")
l = F("l")
b = G("b")
a = H("a")
d = B("d")

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