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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.s: F = None
        self.y: C = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: C = None
        self.z: G = None
        self.t: G = None
        self.w: C = None
        self.o: C = None
        self.v: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: A = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

j = A("j")
f = B("f")
i = C("i")
c = D("c")
k = E("k")
g = F("g")
h = G("h")

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.s: F = None
        self.y: C = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: C = None
        self.z: G = None
        self.t: G = None
        self.w: C = None
        self.o: C = None
        self.v: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: A = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

j = A("j")
f = B("f")
i = C("i")
c = D("c")
k = E("k")
g = F("g")
h = G("h")

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