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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: G = None
        self.z: G = None
        self.y: B = None
        self.x: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: B = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

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

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

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

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

e = A("e")
b = B("b")
n = C("n")
i = D("i")
l = E("l")
h = F("h")
m = G("m")
g = B("g")

e.u = l
e.z = n
e.y = n
e.p = g
b.s = i
b.x = i
b.t = m
b.z = m
b.y = g
b.r = h
n.t = l
n.w = b
n.r = g
n.z = h
i.r = h
i.q = b
i.p = n
l.y = h
l.s = h
h.o = e
m.t = g
m.p = e
g.s = i
g.x = i
g.t = m
g.z = m
g.y = b
g.r = h
assert b.x.r.o.p.r.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: C = None
        self.y: C = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: G = None
        self.z: G = None
        self.y: B = None
        self.x: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: B = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

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

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

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

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

e = A("e")
b = B("b")
n = C("n")
i = D("i")
l = E("l")
h = F("h")
m = G("m")
g = B("g")

e.u = l
e.z = n
e.y = n
e.p = g
b.s = i
b.x = i
b.t = m
b.z = m
b.y = g
b.r = h
n.t = l
n.w = b
n.r = g
n.z = h
i.r = h
i.q = b
i.p = n
l.y = h
l.s = h
h.o = e
m.t = g
m.p = e
g.s = i
g.x = i
g.t = m
g.z = m
g.y = b
g.r = h
assert b.x.r.o.p.r.o.z.txt == "n"