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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: C = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

j = A("j")
n = B("n")
g = C("g")
h = D("h")
a = E("a")
b = F("b")
i = B("i")
m = C("m")
d = F("d")
k = A("k")

j.o = b
j.t = b
j.v = h
j.w = d
j.z = g
j.r = m
n.r = m
g.x = a
g.z = a
g.r = h
h.t = d
h.w = d
h.s = m
a.o = i
a.t = g
a.w = d
b.v = g
i.r = m
m.x = a
m.z = a
m.r = h
d.v = g
k.o = d
k.w = d
k.v = h
k.z = g
k.r = g
k.t = b
assert j.v.s.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: D = None
        self.w: F = None
        self.z: C = None
        self.r: C = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: C = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

j = A("j")
n = B("n")
g = C("g")
h = D("h")
a = E("a")
b = F("b")
i = B("i")
m = C("m")
d = F("d")
k = A("k")

j.o = b
j.t = b
j.v = h
j.w = d
j.z = g
j.r = m
n.r = m
g.x = a
g.z = a
g.r = h
h.t = d
h.w = d
h.s = m
a.o = i
a.t = g
a.w = d
b.v = g
i.r = m
m.x = a
m.z = a
m.r = h
d.v = g
k.o = d
k.w = d
k.v = h
k.z = g
k.r = g
k.t = b
assert j.v.s.x.txt == "a"