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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: B = None
        self.s: A = None
        self.w: E = None
        self.v: B = None
        self.o: E = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: B = None
        self.s: A = None
        self.w: E = None
        self.v: B = None
        self.o: E = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: D = None
        self.txt = txt

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

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