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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.u: F = None
        self.o: F = None
        self.x: A = None
        self.txt = txt

m = A("m")
j = B("j")
c = C("c")
h = D("h")
a = E("a")
g = F("g")
k = F("k")
l = F("l")
i = C("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.u: F = None
        self.o: F = None
        self.x: A = None
        self.txt = txt

m = A("m")
j = B("j")
c = C("c")
h = D("h")
a = E("a")
g = F("g")
k = F("k")
l = F("l")
i = C("i")

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