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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: F = None
        self.w: D = None
        self.z: C = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.y: B = None
        self.w: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: F = None
        self.w: D = None
        self.z: C = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.y: B = None
        self.w: A = None
        self.t: A = None
        self.txt = txt

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

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

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