class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: A = None
        self.q: C = None
        self.r: B = None
        self.u: C = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

a = A("a")
c = B("c")
l = C("l")
g = D("g")
e = E("e")
i = F("i")
d = A("d")
m = F("m")
b = D("b")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

a = A("a")
c = B("c")
l = C("l")
g = D("g")
e = E("e")
i = F("i")
d = A("d")
m = F("m")
b = D("b")

a.v = m
a.x = d
a.q = l
a.u = l
a.r = c
a.t = i
c.w = b
c.z = l
c.o = l
c.y = l
c.p = d
c.u = d
l.q = b
l.t = d
l.u = m
l.x = g
l.v = e
l.p = c
g.y = l
g.r = m
g.u = i
e.q = b
e.z = m
e.r = m
i.s = l
d.v = i
d.x = a
d.q = l
d.u = l
d.r = c
d.t = m
m.s = l
b.y = l
b.r = i
b.u = m
assert i.s.x.u.s.x.u.s.txt == "l"