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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.w: F = None
        self.p: D = None
        self.y: E = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: A = None
        self.p: D = None
        self.q: F = None
        self.txt = txt

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

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

j.u = e
j.t = b
d.r = c
d.p = c
d.z = c
d.u = h
d.w = n
d.y = g
h.w = n
h.v = c
c.p = n
c.s = a
g.w = k
g.v = b
g.p = c
g.q = n
n.u = h
n.z = h
n.w = g
b.u = e
b.t = a
e.p = n
e.s = b
k.r = e
k.p = e
k.z = e
k.u = h
k.w = n
k.y = g
a.u = e
a.t = j
assert e.p.w.p.s.t.u.s.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.w: F = None
        self.p: D = None
        self.y: E = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: A = None
        self.p: D = None
        self.q: F = None
        self.txt = txt

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

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

j.u = e
j.t = b
d.r = c
d.p = c
d.z = c
d.u = h
d.w = n
d.y = g
h.w = n
h.v = c
c.p = n
c.s = a
g.w = k
g.v = b
g.p = c
g.q = n
n.u = h
n.z = h
n.w = g
b.u = e
b.t = a
e.p = n
e.s = b
k.r = e
k.p = e
k.z = e
k.u = h
k.w = n
k.y = g
a.u = e
a.t = j
assert e.p.w.p.s.t.u.s.u.s.txt == "b"