class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.s: D = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: B = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.z: D = None
        self.t: A = None
        self.r: E = None
        self.v: B = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.p: F = None
        self.o: D = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: B = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.z: D = None
        self.t: A = None
        self.r: E = None
        self.v: B = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.p: F = None
        self.o: D = None
        self.x: C = None
        self.txt = txt

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

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