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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.y: F = None
        self.txt = txt

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

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

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

f = A("f")
e = B("e")
n = C("n")
k = D("k")
d = E("d")
h = F("h")
i = G("i")
m = G("m")
j = C("j")

f.q = d
f.p = d
f.v = e
f.t = e
e.y = k
n.t = m
n.o = k
k.z = e
k.x = d
k.y = h
d.t = j
d.p = m
d.r = k
d.y = k
d.u = n
d.z = e
h.y = m
i.q = k
i.z = k
i.y = e
i.t = f
i.p = d
m.q = k
m.z = k
m.y = e
m.t = f
m.p = d
j.t = i
j.o = k
assert h.y.y.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: E = None
        self.v: B = None
        self.t: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.y: F = None
        self.txt = txt

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

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

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

f = A("f")
e = B("e")
n = C("n")
k = D("k")
d = E("d")
h = F("h")
i = G("i")
m = G("m")
j = C("j")

f.q = d
f.p = d
f.v = e
f.t = e
e.y = k
n.t = m
n.o = k
k.z = e
k.x = d
k.y = h
d.t = j
d.p = m
d.r = k
d.y = k
d.u = n
d.z = e
h.y = m
i.q = k
i.z = k
i.y = e
i.t = f
i.p = d
m.q = k
m.z = k
m.y = e
m.t = f
m.p = d
j.t = i
j.o = k
assert h.y.y.y.y.y.txt == "m"