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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: B = None
        self.q: A = None
        self.t: C = None
        self.y: D = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: B = None
        self.q: A = None
        self.t: C = None
        self.y: D = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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