class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: F = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: D = None
        self.p: B = None
        self.q: E = None
        self.v: G = None
        self.txt = txt

e = A("e")
i = B("i")
k = C("k")
f = D("f")
m = E("m")
j = F("j")
b = G("b")
g = G("g")
d = G("d")

e.v = k
e.u = k
e.t = j
i.t = m
i.w = k
i.o = g
k.v = b
k.y = i
f.y = g
f.t = i
f.w = d
m.s = i
m.x = e
m.t = f
j.x = m
j.p = m
b.r = m
b.q = m
b.x = f
b.p = i
b.v = d
g.r = m
g.q = m
g.x = f
g.p = i
g.v = b
d.r = m
d.q = m
d.x = f
d.p = i
d.v = b
assert f.t.t.x.t.x.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: F = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: D = None
        self.p: B = None
        self.q: E = None
        self.v: G = None
        self.txt = txt

e = A("e")
i = B("i")
k = C("k")
f = D("f")
m = E("m")
j = F("j")
b = G("b")
g = G("g")
d = G("d")

e.v = k
e.u = k
e.t = j
i.t = m
i.w = k
i.o = g
k.v = b
k.y = i
f.y = g
f.t = i
f.w = d
m.s = i
m.x = e
m.t = f
j.x = m
j.p = m
b.r = m
b.q = m
b.x = f
b.p = i
b.v = d
g.r = m
g.q = m
g.x = f
g.p = i
g.v = b
d.r = m
d.q = m
d.x = f
d.p = i
d.v = b
assert f.t.t.x.t.x.x.u.txt == "k"