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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: A = None
        self.z: D = None
        self.y: G = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: F = None
        self.z: E = None
        self.r: F = None
        self.p: F = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: C = None
        self.q: F = None
        self.w: B = None
        self.t: D = None
        self.p: G = None
        self.x: B = None
        self.txt = txt

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

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

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

j.o = g
j.v = i
j.p = i
j.t = h
j.y = m
h.t = l
h.y = l
h.p = b
h.z = g
h.w = i
i.x = b
g.w = i
g.v = m
g.r = m
g.p = m
g.q = m
g.z = k
c.o = m
c.q = m
c.z = i
c.w = h
c.x = h
c.t = g
c.p = l
m.t = g
m.z = l
l.t = h
b.o = g
b.v = i
b.p = i
b.t = h
b.y = m
k.o = m
k.q = m
k.z = i
k.w = h
k.x = h
k.t = g
k.p = l
assert c.p.t.t.t.w.x.y.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: C = None
        self.p: C = None
        self.t: B = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: A = None
        self.z: D = None
        self.y: G = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: F = None
        self.z: E = None
        self.r: F = None
        self.p: F = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: C = None
        self.q: F = None
        self.w: B = None
        self.t: D = None
        self.p: G = None
        self.x: B = None
        self.txt = txt

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

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

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

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