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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: F = None
        self.p: G = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: A = None
        self.w: D = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: F = None
        self.p: G = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: A = None
        self.w: D = None
        self.t: F = None
        self.txt = txt

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

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