class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: G = None
        self.q: B = None
        self.w: D = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: G = None
        self.p: F = None
        self.v: F = None
        self.x: F = None
        self.r: C = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.y: B = None
        self.o: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: A = None
        self.r: A = None
        self.z: B = None
        self.v: C = None
        self.txt = txt

h = A("h")
j = B("j")
l = C("l")
e = D("e")
b = E("b")
m = F("m")
k = G("k")
g = F("g")

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: G = None
        self.p: F = None
        self.v: F = None
        self.x: F = None
        self.r: C = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.y: B = None
        self.o: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: A = None
        self.r: A = None
        self.z: B = None
        self.v: C = None
        self.txt = txt

h = A("h")
j = B("j")
l = C("l")
e = D("e")
b = E("b")
m = F("m")
k = G("k")
g = F("g")

h.v = g
h.s = k
h.q = j
h.w = e
h.o = l
j.w = l
j.r = l
j.u = k
j.p = g
j.x = g
j.v = m
j.q = e
l.r = j
l.y = j
l.z = h
l.o = m
e.w = l
e.z = l
e.v = g
b.s = g
m.s = b
k.w = l
k.v = l
k.s = h
k.r = h
k.z = j
g.s = b
assert l.o.s.s.s.s.s.txt == "b"