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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: F = None
        self.u: E = None
        self.v: D = None
        self.o: D = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: F = None
        self.u: E = None
        self.v: D = None
        self.o: D = None
        self.y: A = None
        self.txt = txt

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

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

n.r = c
n.u = c
n.t = c
n.y = b
n.o = l
n.z = e
c.s = b
b.q = n
b.s = c
b.v = c
b.t = c
b.p = h
b.u = j
b.z = e
e.r = b
e.o = b
e.p = b
e.q = d
e.z = g
g.x = b
g.t = j
g.u = n
h.x = g
h.u = g
h.t = l
h.v = e
h.o = e
h.y = n
j.t = c
j.p = b
j.u = b
j.s = b
d.t = c
d.p = b
d.u = b
d.s = b
l.x = g
l.u = g
l.t = h
l.v = e
l.o = e
l.y = n
assert h.y.o.t.v.txt == "e"