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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: F = None
        self.p: A = None
        self.r: C = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: G = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.r: A = None
        self.txt = txt

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

j = A("j")
c = B("c")
i = C("i")
h = D("h")
m = E("m")
b = F("b")
g = G("g")
d = E("d")

j.o = i
j.s = i
j.z = i
j.y = g
c.t = i
c.r = i
c.y = i
c.q = b
c.p = j
i.v = c
h.o = i
h.t = c
m.o = h
m.t = g
m.w = j
m.v = j
b.t = c
b.s = i
b.r = j
g.p = i
d.o = h
d.t = g
d.w = j
d.v = j
assert h.o.v.r.v.p.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.y: G = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: F = None
        self.p: A = None
        self.r: C = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: G = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.r: A = None
        self.txt = txt

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

j = A("j")
c = B("c")
i = C("i")
h = D("h")
m = E("m")
b = F("b")
g = G("g")
d = E("d")

j.o = i
j.s = i
j.z = i
j.y = g
c.t = i
c.r = i
c.y = i
c.q = b
c.p = j
i.v = c
h.o = i
h.t = c
m.o = h
m.t = g
m.w = j
m.v = j
b.t = c
b.s = i
b.r = j
g.p = i
d.o = h
d.t = g
d.w = j
d.v = j
assert h.o.v.r.v.p.z.v.txt == "c"