class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: B = None
        self.y: E = None
        self.o: B = None
        self.t: C = None
        self.r: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: B = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

d = A("d")
n = B("n")
k = C("k")
c = D("c")
i = E("i")
g = F("g")
j = G("j")
m = G("m")
l = F("l")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: B = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

d = A("d")
n = B("n")
k = C("k")
c = D("c")
i = E("i")
g = F("g")
j = G("j")
m = G("m")
l = F("l")

d.p = c
d.v = n
d.o = n
d.y = i
d.t = k
d.r = l
n.x = i
n.o = k
n.y = k
k.t = j
c.w = k
c.r = k
c.q = k
c.u = j
c.t = d
i.s = k
g.p = n
g.q = l
g.v = l
j.u = c
j.w = n
j.v = g
j.s = i
m.u = c
m.w = n
m.v = l
m.s = i
l.p = n
l.q = g
l.v = g
assert l.q.p.x.s.txt == "k"