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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: A = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

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

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

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

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

c.w = f
c.x = j
c.q = m
l.t = m
l.q = m
l.o = c
l.x = j
f.t = l
e.x = c
e.v = c
e.y = c
e.q = l
e.w = i
m.s = g
m.r = c
i.x = c
i.v = c
i.y = c
i.q = l
i.w = e
b.s = f
b.r = c
g.t = l
j.t = b
j.o = c
j.q = m
j.x = l
assert i.q.x.x.x.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: B = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: A = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

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

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

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

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

c.w = f
c.x = j
c.q = m
l.t = m
l.q = m
l.o = c
l.x = j
f.t = l
e.x = c
e.v = c
e.y = c
e.q = l
e.w = i
m.s = g
m.r = c
i.x = c
i.v = c
i.y = c
i.q = l
i.w = e
b.s = f
b.r = c
g.t = l
j.t = b
j.o = c
j.q = m
j.x = l
assert i.q.x.x.x.q.txt == "m"