class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: B = None
        self.r: C = None
        self.t: G = None
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: E = None
        self.z: G = None
        self.v: G = None
        self.o: D = None
        self.x: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: E = None
        self.z: G = None
        self.v: G = None
        self.o: D = None
        self.x: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

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

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