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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: G = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: G = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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