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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: A = None
        self.t: C = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: A = None
        self.t: C = None
        self.x: A = None
        self.txt = txt

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

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

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

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