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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.u: B = None
        self.y: E = None
        self.q: G = None
        self.x: G = None
        self.v: D = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: A = None
        self.o: A = None
        self.t: G = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: H = None
        self.p: C = None
        self.v: G = None
        self.q: A = None
        self.x: A = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: B = None
        self.y: A = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.u: B = None
        self.y: E = None
        self.q: G = None
        self.x: G = None
        self.v: D = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: A = None
        self.o: A = None
        self.t: G = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: H = None
        self.p: C = None
        self.v: G = None
        self.q: A = None
        self.x: A = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: B = None
        self.y: A = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

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

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