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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: E = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.s: F = None
        self.q: E = None
        self.txt = txt

i = A("i")
j = B("j")
f = C("f")
g = D("g")
b = E("b")
k = F("k")
a = D("a")
n = F("n")
e = D("e")

i.v = f
i.t = b
i.u = g
j.v = k
j.s = f
f.t = i
f.x = i
f.z = b
g.s = f
g.t = f
g.z = b
b.p = a
k.r = e
k.x = j
k.s = n
k.q = b
a.s = f
a.t = f
a.z = b
n.r = a
n.x = j
n.s = k
n.q = b
e.s = f
e.t = f
e.z = b
assert i.u.t.t.v.z.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: E = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.s: F = None
        self.q: E = None
        self.txt = txt

i = A("i")
j = B("j")
f = C("f")
g = D("g")
b = E("b")
k = F("k")
a = D("a")
n = F("n")
e = D("e")

i.v = f
i.t = b
i.u = g
j.v = k
j.s = f
f.t = i
f.x = i
f.z = b
g.s = f
g.t = f
g.z = b
b.p = a
k.r = e
k.x = j
k.s = n
k.q = b
a.s = f
a.t = f
a.z = b
n.r = a
n.x = j
n.s = k
n.q = b
e.s = f
e.t = f
e.z = b
assert i.u.t.t.v.z.p.z.txt == "b"