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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: C = None
        self.u: B = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: B = None
        self.o: F = None
        self.txt = txt

l = A("l")
c = B("c")
g = C("g")
j = D("j")
k = E("k")
h = F("h")
b = C("b")
d = D("d")
f = C("f")
n = F("n")

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: C = None
        self.u: B = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: B = None
        self.o: F = None
        self.txt = txt

l = A("l")
c = B("c")
g = C("g")
j = D("j")
k = E("k")
h = F("h")
b = C("b")
d = D("d")
f = C("f")
n = F("n")

l.s = c
l.u = n
l.q = k
c.s = d
c.z = f
c.v = j
g.v = f
g.q = f
g.u = c
g.s = l
j.v = d
j.x = c
j.y = c
k.t = n
k.u = d
h.q = n
h.o = n
h.w = c
b.v = g
b.q = f
b.u = c
b.s = l
d.v = j
d.x = c
d.y = c
f.v = b
f.q = b
f.u = c
f.s = l
n.q = h
n.o = h
n.w = c
assert l.s.v.x.s.x.z.v.u.txt == "c"