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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: E = None
        self.o: D = None
        self.u: G = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: E = None
        self.txt = txt

n = A("n")
b = B("b")
a = C("a")
e = D("e")
f = E("f")
h = F("h")
m = G("m")

n.u = a
n.r = a
n.v = h
n.t = e
n.y = m
n.x = b
b.t = n
b.v = n
b.p = h
b.u = a
b.o = a
b.s = a
b.r = e
a.r = b
a.y = f
a.o = e
a.u = m
a.w = n
e.q = h
e.r = m
e.o = a
f.u = b
h.q = a
m.y = a
m.v = f
assert e.r.y.u.v.u.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: F = None
        self.t: D = None
        self.r: C = None
        self.y: G = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: E = None
        self.o: D = None
        self.u: G = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: E = None
        self.txt = txt

n = A("n")
b = B("b")
a = C("a")
e = D("e")
f = E("f")
h = F("h")
m = G("m")

n.u = a
n.r = a
n.v = h
n.t = e
n.y = m
n.x = b
b.t = n
b.v = n
b.p = h
b.u = a
b.o = a
b.s = a
b.r = e
a.r = b
a.y = f
a.o = e
a.u = m
a.w = n
e.q = h
e.r = m
e.o = a
f.u = b
h.q = a
m.y = a
m.v = f
assert e.r.y.u.v.u.t.t.txt == "e"