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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: D = None
        self.t: A = None
        self.p: F = None
        self.txt = txt

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

n = A("n")
b = B("b")
m = C("m")
k = D("k")
e = E("e")
c = F("c")
l = G("l")
f = D("f")
a = B("a")
j = F("j")

n.u = m
n.x = e
n.w = c
b.s = f
b.w = k
b.p = l
b.t = l
m.w = k
m.o = l
k.u = e
k.s = j
k.x = m
e.t = f
e.o = j
c.z = m
c.r = k
c.t = n
c.p = j
l.x = m
f.u = e
f.s = j
f.x = m
a.s = f
a.w = k
a.p = l
a.t = l
j.z = m
j.r = f
j.t = n
j.p = c
assert e.t.x.w.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: E = None
        self.w: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: D = None
        self.t: A = None
        self.p: F = None
        self.txt = txt

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

n = A("n")
b = B("b")
m = C("m")
k = D("k")
e = E("e")
c = F("c")
l = G("l")
f = D("f")
a = B("a")
j = F("j")

n.u = m
n.x = e
n.w = c
b.s = f
b.w = k
b.p = l
b.t = l
m.w = k
m.o = l
k.u = e
k.s = j
k.x = m
e.t = f
e.o = j
c.z = m
c.r = k
c.t = n
c.p = j
l.x = m
f.u = e
f.s = j
f.x = m
a.s = f
a.w = k
a.p = l
a.t = l
j.z = m
j.r = f
j.t = n
j.p = c
assert e.t.x.w.txt == "k"