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

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

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

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

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

c = A("c")
e = B("e")
l = C("l")
i = D("i")
b = E("b")
j = E("j")
d = D("d")
a = B("a")
f = A("f")

c.u = a
c.r = j
c.t = l
e.q = a
e.p = a
e.u = j
e.o = c
e.w = d
l.t = i
i.u = d
i.p = b
i.t = j
b.y = c
b.r = l
b.t = j
j.y = f
j.r = l
j.t = b
d.u = i
d.p = j
d.t = j
a.q = e
a.p = e
a.u = b
a.o = f
a.w = d
f.u = e
f.r = j
f.t = l
assert a.w.u.p.y.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: E = None
        self.t: C = None
        self.txt = txt

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

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

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

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

c = A("c")
e = B("e")
l = C("l")
i = D("i")
b = E("b")
j = E("j")
d = D("d")
a = B("a")
f = A("f")

c.u = a
c.r = j
c.t = l
e.q = a
e.p = a
e.u = j
e.o = c
e.w = d
l.t = i
i.u = d
i.p = b
i.t = j
b.y = c
b.r = l
b.t = j
j.y = f
j.r = l
j.t = b
d.u = i
d.p = j
d.t = j
a.q = e
a.p = e
a.u = b
a.o = f
a.w = d
f.u = e
f.r = j
f.t = l
assert a.w.u.p.y.r.r.txt == "l"