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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: E = None
        self.q: D = None
        self.o: G = None
        self.v: E = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: C = None
        self.w: B = None
        self.x: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: G = None
        self.r: A = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: A = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: E = None
        self.q: D = None
        self.o: G = None
        self.v: E = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: C = None
        self.w: B = None
        self.x: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: G = None
        self.r: A = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: A = None
        self.p: B = None
        self.txt = txt

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

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

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