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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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