class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: G = None
        self.y: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: A = None
        self.x: G = None
        self.t: B = None
        self.u: F = None
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

b = A("b")
h = B("h")
c = C("c")
e = D("e")
k = E("k")
a = F("a")
d = G("d")
j = H("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: A = None
        self.x: G = None
        self.t: B = None
        self.u: F = None
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

b = A("b")
h = B("h")
c = C("c")
e = D("e")
k = E("k")
a = F("a")
d = G("d")
j = H("j")

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