class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.r: E = None
        self.t: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: E = None
        self.y: E = None
        self.v: B = None
        self.x: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: E = None
        self.y: E = None
        self.v: B = None
        self.x: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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