class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: G = None
        self.t: C = None
        self.y: F = None
        self.s: E = None
        self.q: B = None
        self.o: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

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

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

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

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