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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.w: E = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: F = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.y: A = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.w: E = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: F = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.y: A = None
        self.r: F = None
        self.txt = txt

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

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