class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: C = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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