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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: A = None
        self.s: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

g = A("g")
h = B("h")
b = C("b")
j = D("j")
f = E("f")
d = F("d")
l = F("l")
c = A("c")
i = D("i")
k = E("k")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: A = None
        self.s: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

g = A("g")
h = B("h")
b = C("b")
j = D("j")
f = E("f")
d = F("d")
l = F("l")
c = A("c")
i = D("i")
k = E("k")

g.s = c
g.u = i
g.r = i
g.o = h
g.w = f
h.p = l
h.y = c
h.s = b
h.x = j
b.q = c
j.x = i
j.q = k
j.t = k
j.r = d
f.q = l
f.p = h
d.y = j
d.r = g
d.q = h
l.y = j
l.r = c
l.q = h
c.s = g
c.u = i
c.r = i
c.o = h
c.w = f
i.x = j
i.q = f
i.r = l
i.t = k
k.q = l
k.p = h
assert h.p.y.q.txt == "k"