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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: D = None
        self.y: F = None
        self.w: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: G = None
        self.t: C = None
        self.u: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: D = None
        self.y: F = None
        self.w: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: G = None
        self.t: C = None
        self.u: B = None
        self.txt = txt

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

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

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