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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: E = None
        self.u: E = None
        self.w: E = None
        self.r: B = None
        self.x: C = None
        self.txt = txt

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

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

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

g.q = m
g.z = i
g.r = i
b.t = a
b.o = g
i.u = b
i.w = b
i.t = b
i.p = c
i.o = a
c.z = h
c.q = m
c.u = a
c.w = a
c.r = b
c.x = i
m.r = c
m.z = g
m.v = i
m.s = i
m.x = a
h.p = c
h.x = i
a.r = c
a.z = g
a.v = i
a.s = i
a.x = m
assert g.z.p.u.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: C = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: E = None
        self.u: E = None
        self.w: E = None
        self.r: B = None
        self.x: C = None
        self.txt = txt

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

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

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

g.q = m
g.z = i
g.r = i
b.t = a
b.o = g
i.u = b
i.w = b
i.t = b
i.p = c
i.o = a
c.z = h
c.q = m
c.u = a
c.w = a
c.r = b
c.x = i
m.r = c
m.z = g
m.v = i
m.s = i
m.x = a
h.p = c
h.x = i
a.r = c
a.z = g
a.v = i
a.s = i
a.x = m
assert g.z.p.u.s.p.txt == "c"