class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: G = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: D = None
        self.v: B = None
        self.w: E = None
        self.o: G = None
        self.x: A = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: F = None
        self.u: B = None
        self.r: C = None
        self.y: G = None
        self.x: F = None
        self.t: C = None
        self.txt = txt

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

j.r = k
j.z = h
j.p = c
c.s = k
i.p = a
l.z = i
a.q = c
k.p = l
k.s = l
k.y = l
k.v = c
k.w = b
k.o = h
k.x = j
h.o = d
h.y = d
h.v = k
h.x = k
h.u = c
h.r = i
h.t = i
d.o = h
d.y = h
d.v = k
d.x = k
d.u = c
d.r = i
d.t = i
b.q = c
assert i.p.q.s.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: G = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: D = None
        self.v: B = None
        self.w: E = None
        self.o: G = None
        self.x: A = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: F = None
        self.u: B = None
        self.r: C = None
        self.y: G = None
        self.x: F = None
        self.t: C = None
        self.txt = txt

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

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