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

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

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

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

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

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

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

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

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

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

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

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

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

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

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