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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

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

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

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

i = A("i")
a = B("a")
n = C("n")
b = D("b")
m = E("m")
g = F("g")
l = G("l")
f = F("f")

i.o = a
i.t = b
a.r = l
n.s = m
n.p = a
b.z = n
b.v = a
b.y = l
m.v = f
m.u = l
m.r = n
g.z = i
g.v = l
g.t = l
g.y = f
g.o = m
g.w = a
l.u = m
f.z = i
f.v = l
f.t = l
f.y = g
f.o = m
f.w = a
assert m.u.u.u.u.r.s.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

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

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

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

i = A("i")
a = B("a")
n = C("n")
b = D("b")
m = E("m")
g = F("g")
l = G("l")
f = F("f")

i.o = a
i.t = b
a.r = l
n.s = m
n.p = a
b.z = n
b.v = a
b.y = l
m.v = f
m.u = l
m.r = n
g.z = i
g.v = l
g.t = l
g.y = f
g.o = m
g.w = a
l.u = m
f.z = i
f.v = l
f.t = l
f.y = g
f.o = m
f.w = a
assert m.u.u.u.u.r.s.v.t.txt == "l"