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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: C = None
        self.y: E = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: C = None
        self.y: E = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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