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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: E = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: E = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

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

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

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

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