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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: C = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: C = None
        self.u: F = None
        self.txt = txt

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

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