class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: C = None
        self.s: E = None
        self.q: A = None
        self.y: D = None
        self.v: E = None
        self.o: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: A = None
        self.v: B = None
        self.r: D = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: A = None
        self.txt = txt

m = A("m")
b = B("b")
a = C("a")
h = D("h")
c = E("c")
j = F("j")
f = G("f")
e = G("e")
d = A("d")
i = D("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: A = None
        self.v: B = None
        self.r: D = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: A = None
        self.txt = txt

m = A("m")
b = B("b")
a = C("a")
h = D("h")
c = E("c")
j = F("j")
f = G("f")
e = G("e")
d = A("d")
i = D("i")

m.p = h
m.y = h
m.z = a
m.s = c
m.v = c
m.q = d
m.o = d
b.u = j
b.v = a
b.y = c
a.x = m
h.x = d
h.y = d
h.v = b
h.p = b
h.r = i
c.y = f
c.x = b
j.p = e
j.w = d
f.o = j
f.s = m
e.o = j
e.s = m
d.p = h
d.y = h
d.z = a
d.s = c
d.v = c
d.q = m
d.o = m
i.x = d
i.y = d
i.v = b
i.p = b
i.r = h
assert f.s.o.s.txt == "c"